import mockRequest from '@/utils/mockRequest'
import request from '@/utils/request.js'

export function fetchList(params) {
    return request({
        url: '/queryToppingArticles',
        method: 'get',
        params: params
    })
}

export function fetchFocus() {
    return request({
        url: '/queryHotArticles',
        method: 'get',
        params: {}
    })
}

export function fetchCategory() {
    return mockRequest({
        url: '/category',
        method: 'get',
        params: {}
    })
}

export function fetchFriend() {
    return request({
        url: '/friend_chain/getAdopt/1/5',
        method: 'get',
        params: {}
    })
}


export function fetchComment(pageNo,pageSize,id) {
	var params = new URLSearchParams();
	params.append('pageNo', pageNo);
	params.append('pageSize', pageSize);
	params.append("id",id)
    return request({
        url: '/queryCommentsAndReplys',
        method: 'post',
        params: params
    })
}

//lol资讯
export function getLols(pageNo,pageSize) {
    return request({
        url: '/index/getLols/'+pageNo+"/"+pageSize,
        method: 'get'
    })
}